<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
    <%!
	    String passwd = null;
		String email = null;
		String type =null;
		Cookie cookies[] = null;
	%>
	<%
		cookies = request.getCookies();
		
		if(cookies==null){
			%>
			<jsp:forward page="index.jsp" />
			<%
		}else{
			for(int i =0 ; i < cookies.length; i++){
				if(cookies[i].getName().equals("passwd")){
					passwd = cookies[i].getValue();
				}else if(cookies[i].getName().equals("email")){
					email = cookies[i].getValue();
				}else if(cookies[i].getName().equals("type")){
					type = cookies[i].getValue();
					if(type.equals("admin")){
					%>
					<jsp:forward page="manager.jsp" />
					<% 
					}else{
					%>
					<jsp:forward page="userDashboard.jsp" />
					<%
					}
			}
		}
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Welcome!</title>
</head>
<body>
	
</body>
</html>